// components/checklist.js
Component({
  /**
   * 组件的属性列表
   */
  properties: {
    lemon: Object,
    checkedCid: String
  },

  /**
   * 组件的初始数据
   */
  data: {

  },

  /**
   * 组件的方法列表
   */
  methods: {
    handleLongpress: function (e) {
      const { lemon: { isStatic, ...payload } } = this.data
      if (isStatic !== undefined && !isStatic) {
        const _this = this
        wx.showActionSheet({
          itemList: ["删除清单"],
          success: function ({ tapIndex }) {
            if (tapIndex === 0) {
              _this.triggerEvent('delete', payload)
            }
          }
        })
      }
    }
  }
})
